﻿using DeviceManager.BusinessLogicLayer;
using DeviceManager.DataAccessLayer;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DeviceManagementIT.DevicesManager.DevicesManagement
{
    public partial class frmAddGroupDevice : Form
    {
        public frmAddGroupDevice()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            if(txtGroupDeviceHelp.Text!=""&&txtGroupDeviceName.Text!="")
            {
                GroupDeviceBllOperation groupdevicebll = new GroupDeviceBllOperation();
                NHOMTHIETBI groupdevice = new NHOMTHIETBI();
                groupdevice.TenNhomTB = txtGroupDeviceName.Text;
                groupdevice.DienGiai = txtGroupDeviceHelp.Text;
                string message = groupdevicebll.SaveRecordUnit(groupdevice);
                MessageBox.Show(message, "Message");
            }
        }
    }
}
